﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

namespace PropertyManagement.login
{
    public partial class right : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                BindData(0);
            }
        }

        public void BindData(int curPageIndex)
        {
            string strsql = "select * from sxinwen order by id desc limit 5";
            mydata myda = new mydata();
            DataSet ds = myda.getDataSet(strsql, "sxinwen");

            PagedDataSource pds = new PagedDataSource();
            pds.DataSource = ds.Tables[0].DefaultView;
            pds.AllowPaging = true;

            DataList1.DataSource = pds;
            DataList1.DataBind();
        }
        
    }
}